#include <bits/stdc++.h>
using namespace std;
int n;
int s = 0;

int main()
{
    cin >> n;
    while (n)
    {
        s = s * 10 + n % 10;//s=3,32,321
        n /= 10;

    }

    cout << s;
}